--[[
//-------------------------------------------------------------------------------//
   Script: draw.TextRotated Hack
   Author: Wizard of Ass
   Edit: Removed scale, not working (ptown2)
   Fixed: Wouldn't let more on screen (might cause performance issues?) (ptown2)
//-------------------------------------------------------------------------------//
]]--

local sDrawText = draw.DrawText
local cPushModelMatrix = cam.PushModelMatrix
local cPopModelMatrix = cam.PopModelMatrix
local mSetAngles = debug.getregistry() .VMatrix.SetAngles
local mSetTranslation = debug.getregistry() .VMatrix.SetTranslation
 
local mat = Matrix()
local matAng = Angle()
local matTrans = Vector()
local matScale = Vector()

function draw.DrawTextRotated(txt, font, posX, posY, ang)
    matAng.y = ang
    mSetAngles(mat, matAng)
    matTrans.x = posX
    matTrans.y = posY
    mSetTranslation(mat, matTrans)
    cPushModelMatrix(mat)
        sDrawText(txt, font)
    cPopModelMatrix()
end